<template>
    <ul class="ul-flex">
        <li v-for="(item, index) in houseData" :key="index" class="li-wrap" :style="{ background: `linear-gradient(180deg, ${item.beginColor} 0%, ${item.endColor} 100%)` }">
            <h6 class="h6-title">
                {{ item.title }}
                <span class="rate">收缴率 {{ item.rate }}</span>
                <span v-if="item.size" class="rate">{{ item.size }}个</span>
            </h6>
            <el-row class="tips">
                <el-col :span="14">
                    <p class="tips-title">应收</p>
                    <p class="tips-val">{{ item.tipsLV }}</p>
                </el-col>
                <el-col :span="10">
                    <p class="tips-title">实收</p>
                    <p class="tips-val">{{ item.tipsRV }}</p>
                </el-col>
            </el-row>
            <div class="float-right">
                <img :src="item.iconUrl" alt="" class="icon-logo" />
            </div>
        </li>
    </ul>
</template>

<script>
export default {
    props: {
        bgmData: {
            type: Array,
            default: () => []
        }
    },
    data() {
        return {
            houseData: [
                {
                    beginColor: '#f5fef2',
                    endColor: '#e6feee',
                    title: '总账单',
                    rate: '26%',
                    size: '',
                    tipsLV: '188800',
                    tipsRV: '25888',
                    iconUrl: '/static/icon/house/icon_07.png'
                },
                {
                    beginColor: '#f2f9fe',
                    endColor: '#e6f4fe',
                    title: '广告位',
                    rate: '26%',
                    size: '12',
                    tipsLV: '801',
                    tipsRV: '1622',
                    iconUrl: '/static/icon/manage/icon_01.png'
                },
                {
                    beginColor: '#f6f7ff',
                    endColor: '#ececff',
                    title: '快递柜',
                    rate: '26%',
                    size: '25',
                    tipsLV: '3500',
                    tipsRV: '16000',
                    iconUrl: '/static/icon/manage/icon_02.png'
                },
                {
                    beginColor: '#fffef6',
                    endColor: '#fff8ec',
                    title: '基站',
                    rate: '26%',
                    size: '22',
                    tipsLV: '201',
                    tipsRV: '1622',
                    iconUrl: '/static/icon/manage/icon_03.png'
                },
                {
                    beginColor: '#f5fef2',
                    endColor: '#e6feee',
                    title: '其他',
                    rate: '26%',
                    size: '3',
                    tipsLV: '202',
                    tipsRV: '165',
                    iconUrl: '/static/icon/house/icon_11.png'
                }
            ]
        };
    }
};
</script>

<style lang="scss" scoped>
.ul-flex {
    display: flex;
    flex-flow: row wrap;
    .li-wrap {
        position: relative;
        display: flex;
        flex-flow: column nowrap;
        width: 260px;
        height: 134px;
        border-radius: 20px;
        padding: 16px 20px;
        margin: 12px 20px 0 0;
        .h6-title {
            font-size: 14px;
            font-weight: 500;
            color: #1d252f;
            .rate {
                font-size: 12px;
                font-weight: 400;
                color: #4e5969;
                margin-left: 10px;
            }
        }
        .tips {
            width: 100%;
            margin-top: 32px;
            .tips-title {
                height: 20px;
                line-height: 20px;
                font-size: 12px;
                color: #4e5969;
            }
            .tips-val {
                height: 30px;
                line-height: 30px;
                font-size: 20px;
                font-weight: bold;
                color: #1d2129;
            }
        }
        .float-right {
            position: absolute;
            top: 12px;
            right: 12px;
            .icon-logo {
                width: 60px;
                height: 60px;
            }
        }
    }
}
</style>
